#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <iostream>
#include <QTcpSocket>
#include <QCloseEvent>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT
    std::string name;
    QTcpSocket* tcpSocket;
public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    void closeEvent(QCloseEvent *);
    
private slots:
    void on_name_returnPressed();

    void on_pushButton_clicked();

public slots:
    void recv();

private:
    Ui::Widget *ui;
};

#endif // WIDGET_H
